package com.sdry.transit.service;


import com.sdry.transit.entity.TransitOrderDetail;
import com.sdry.transit.mapper.TransitOrderDetailMapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

/**
 *
 *@ClassName: TransitOrderServiceImpl
 *@Description: 中转区生产指令
 *@Author tdd
 *@Date 2020-2-19 15:38:03
 *@version 1.0
*/
@Service
@Transactional(rollbackFor = Exception.class)
public class TransitOrderDetailServiceImpl implements TransitOrderDetailService {
	@Resource
	TransitOrderDetailMapper transitOrderDetailMapper;
	//声明一个Logger
	private final static Logger logger = LoggerFactory.getLogger(TransitOrderDetailServiceImpl.class);
	/** 
	 * 根据主键id查询实体
	 * @param id 主键id
	 * @return 实体
	*/
	public TransitOrderDetail queryById(Long id) {
		return transitOrderDetailMapper.queryById(id);
	}
	/** 
	 * 条件查询所有
	 * @param param 实体条件
	 * @return 实体集合
	*/
	public List<TransitOrderDetail> queryAllByMution(TransitOrderDetail param) {
		return transitOrderDetailMapper.queryAllByMution(param);
	}
	/** 
	 * 条件分页查询
	 * @param param 实体条件
	 * @return 实体集合
	*/
	public List<TransitOrderDetail> findPageByMution(TransitOrderDetail param) {
		return transitOrderDetailMapper.findPageByMution(param);
	}
	/** 
	 * 条件查询记录数
	 * @param param 实体条件
	 * @return 实体集合
	*/
	public Integer selectCountByMution(TransitOrderDetail param) {
		return transitOrderDetailMapper.selectCountByMution(param);
	}
	/** 
	 * 插入返回id
	 * @param param 实体条件
	 * @return 主键id
	*/
	public Long insert(TransitOrderDetail param) {
		return transitOrderDetailMapper.insert(param);
	}
	/** 
	 * 根据主键更新 返回影响行数
	 * @param param 实体条件
	 * @return 影响行数
	*/
	public Integer update(TransitOrderDetail param) {
		return transitOrderDetailMapper.update(param);
	}
	/** 
	 * 根据主键拼接的字符串删除返回影响行数
	 * @param ids 主键拼接的字符串
	 * @return 影响行数
	*/
	public Integer delete(String ids) {
		return transitOrderDetailMapper.delete(ids);
	}
}
